<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Interaction'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Offices'), array('controller' => 'offices', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Office'), array('controller' => 'offices', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="interactionsIndex">
	<h2><?php echo __('Interactions'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('i_date','Date'); ?></th>
			<th><?php echo $this->Paginator->sort('i_type','Type'); ?></th>
			<th><?php echo $this->Paginator->sort('i_details','Interaction Details'); ?></th>
			<th><?php echo $this->Paginator->sort('e_id','Employee'); ?></th>
			<th><?php echo $this->Paginator->sort('o_id','Office'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($interactions as $interaction): ?>
	<tr>
		<td><?php echo h($interaction['Interaction']['i_date']); ?>&nbsp;</td>
		<td><?php echo h($interaction['int_type']['type_name']); ?>&nbsp;</td>
		<td><?php echo h($interaction['Interaction']['i_details']); ?>&nbsp;</td>
		<td><?php echo h($interaction['Employee']['e_fname'].' '.$interaction['Employee']['e_lname']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($interaction['Office']['o_name'], array('controller' => 'offices', 'action' => 'view', $interaction['Office']['o_id'])); ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $interaction['Interaction']['i_id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $interaction['Interaction']['i_id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $interaction['Interaction']['i_id']), null, __('Are you sure you want to delete this interaction handled on the %s?', $interaction['Interaction']['i_date'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('Previous '), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('Next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>

